package com.koalac.ironman.util;

import java.nio.charset.Charset;

/**
 * 字符集合类
 * 
 * @description
 * @author chenzf
 * @Date 2012 2012-2-2
 */
public class CharsetUints {

	public static final Charset UTF_16 = Charset.forName("UTF-16");

	public static final Charset UTF_16BE = Charset.forName("UTF-16BE");

	public static final Charset UTF_16LE = Charset.forName("UTF-16LE");

	public static final Charset UTF_8 = Charset.forName("UTF-8");

	public static final Charset ISO_8859_1 = Charset.forName("ISO-8859-1");

	public static final Charset US_ASCII = Charset.forName("US-ASCII");

	public static final Charset CH_G_CHARSET = Charset.forName("Gb2312");

	public static final String UTF_8String = "UTF_8";

	public static Charset findCharset(String chartname) {
		return Charset.forName(chartname);
	}

	/**
	 * 
	 * @param set
	 * @return
	 * @description 获取当前的字符集的名称
	 * @Date 2013 2013-3-19
	 * @author chenzf
	 */
	public final static String getCharsetName(Charset set) {
		return set.name();
	}
}
